package com.shycloud.mido.music.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.shycloud.mido.music.domain.MisMusic;
import com.baomidou.mybatisplus.extension.service.IService;
import com.shycloud.mido.music.domain.MisMusicCollection;
import com.shycloud.mido.music.vo.MisMusicVO;

import java.util.List;

public interface MisMusicService extends IService<MisMusic> {

	/**
	 * 获取曲目信息
	 *
	 * @param page
	 * @param conllectionId
	 * @return com.baomidou.mybatisplus.core.metadata.IPage<com.shycloud.mido.music.vo.MisMusicVO>
	 * @author nianhua.jiang
	 * @date 2020/6/12 16:16
	 */
	IPage<MisMusicVO> getMusicPage(Page page, Integer conllectionId);

	/**
	 * 判断该用户是否为vip用户
	 *
	 * @param memberId
	 * @return java.lang.String
	 * @author nianhua.jiang
	 * @date 2020/6/30 10:07
	 */
	String checkIsVip(String memberId);

	/**
	 * 添加曲目
	 *
	 * @param misMusic
	 * @return boolean
	 * @author nianhua.jiang
	 * @date 2020/7/2 17:37
	 */
	int addMusic(MisMusic misMusic);

	/**
	 * 获取曲目信息
	 *
	 * @param page
	 * @param name
	 * @param status
	 * @param memberAuthority
	 * @param id
	 * @param collectionId
	 * @return com.baomidou.mybatisplus.core.metadata.IPage<com.shycloud.mido.music.domain.MisMusic>
	 * @author nianhua.jiang
	 * @date 2020/7/3 9:48
	 */
	IPage<MisMusic> getMusicList(Page page, String name, String status, String memberAuthority, Integer id, Integer collectionId);

	/**
	 * 书籍配套资源
	 *
	 * @param
	 * @return java.lang.Integer
	 * @author nianhua.jiang
	 * @date 2020/7/3 14:57
	 */
	List<MisMusic> getResouresCount();

	/**
	 * 每月更新mp3下载次数
	 *
	 * @return int
	 * @author nianhua.jiang
	 * @date 2020/9/1 2:01
	 **/
	int updateDownLoadMp3Count();

	MisMusic getValidMusicById(Integer musicId);

	/**
	 * 更新MP3下载次数
	 *
	 * @return
	 * @author nianhua.jiang
	 * @date 2020/9/1 2:13
	 **/
	boolean downloadMp3Success();

	String getIsTeacher(String memberId);
}
